package com.ruoyi.finance.mapper;

import com.ruoyi.IndexDtoByThree;
import com.ruoyi.finance.dto.IndexReceiveReqDto;
import com.ruoyi.system.api.domain.finance.ReciveReq;

import java.math.BigDecimal;
import java.util.List;

/**
 * 应收需求单Mapper接口
 *
 * @author wl
 * @date 2024-11-01
 */
public interface ReciveReqMapper {
    /**
     * 查询应收需求单
     *
     * @param id 应收需求单主键
     * @return 应收需求单
     */
    public ReciveReq selectReciveReqById(Integer id);
    /**
     * 查询当前所有未核销金额
     */
    public BigDecimal getAllAmount();
    /**
     * 查询当天新增销售应收数量及金额
     *
     */
    public IndexReceiveReqDto getSaleOrderReciveCountAndMoney();
    public IndexReceiveReqDto getBuyBackReciveCountAndMoney();
    public IndexDtoByThree getReceiveReqThreeCountToIndex();
    /**
     * 查询应收需求单列表
     *
     * @param reciveReq 应收需求单
     * @return 应收需求单集合
     */
    public List<ReciveReq> selectReciveReqList(ReciveReq reciveReq);

    /**
     * 新增应收需求单
     *
     * @param reciveReq 应收需求单
     * @return 结果
     */
    public int insertReciveReq(ReciveReq reciveReq);

    /**
     * 修改应收需求单
     *
     * @param reciveReq 应收需求单
     * @return 结果
     */
    public int updateReciveReq(ReciveReq reciveReq);

    /**
     * 删除应收需求单
     *
     * @param id 应收需求单主键
     * @return 结果
     */
    public int deleteReciveReqById(Integer id);

    /**
     * 批量删除应收需求单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteReciveReqByIds(Integer[] ids);

    int selectCountReciveReqByOrderCode(String orderCode);

    int updateReciveReqByOrderCode(ReciveReq reciveReq);

    ReciveReq selectReciveReqByOrderCode(String orderCode);

    ReciveReq selectReciveReqBySrcOrderCode(String srcOrderCode);

    int updateReciveOrderByOrderCodeOfVerMoney(ReciveReq reciveReq);
}
